package com.lch.designpattern.singleton;

import com.lch.designpattern.singleton.register.ContainerSingleton;

/**
 * @author: liuchenhui
 * @create: 2019-04-17 00:34
 **/
public class ContainerSingletonTest {
    public static void main(String[] args) {

//        Object obj = ContainerSingleton.getBean("com.lch.designpattern.singleton.Pojo");
//        System.out.println(obj);

        try {
            ConcurrentExecutor.execute(() -> {
                Object obj1 = ContainerSingleton.getBean("com.lch.designpattern.singleton.Pojo");
                System.out.println(System.currentTimeMillis() + "|" + obj1);
            }, 10, 6);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}